package main.com.sun.jeecgexam.struts.mapping;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by sun on 2017/3/28.
 */
public class ActionMapping {

    // action name
    private String name;

    // form class
    private String formClass;

    // action class
    private String actionClass;

    // 页面跳转控制列表
    Map<String, ActionForward> forwardMap = new HashMap<String, ActionForward>();



    public void addForward(ActionForward forward){
        if (forward == null) {
            return ;
        }

        this.forwardMap.put(forward.getName(), forward);
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getFormClass() {
        return formClass;
    }

    public void setFormClass(String formClass) {
        this.formClass = formClass;
    }

    public String getActionClass() {
        return actionClass;
    }

    public void setActionClass(String actionClass) {
        this.actionClass = actionClass;
    }

    public Map<String, ActionForward> getForwardMap() {
        return forwardMap;
    }

    public void setForwardMap(Map<String, ActionForward> forwardMap) {
        this.forwardMap = forwardMap;
    }



    @Override
    public String toString() {
        return "ActionMapping{" +
                "name='" + name + '\'' +
                ", formClass='" + formClass + '\'' +
                ", actionClass='" + actionClass + '\'' +
                ", forwardMap=" + forwardMap +
                '}';
    }
}
